<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="聚客_好评墙" />
<link type="text/css" rel="stylesheet" href="<?php echo base_url("theme/css");?>/reset.css" media="screen" />
<script type="text/javascript" src="<?php echo base_url("theme/js");?>/jquery.min.js"></script>

<!-- //下面加载模块样式 -->
<?php
	if( !empty($configseting)) :
		$output_style = get_filenames('output_style/'.$configseting['style_id']);
		foreach($output_style as $key=>$val){
			if($val == 'effect.js') continue;
			if(substr($val,-2) == 'js')
				echo '<script type="text/javascript" src="'.base_url("output_style").'/'.$configseting['style_id'].'/'.$val.'"></script>';
			if(substr($val,-2) == 'ss')
				echo '<link type="text/css" rel="stylesheet" href="'.base_url("output_style").'/'.$configseting['style_id'].'/'.$val.'" />';	
		}
		echo '<script type="text/javascript" src="'.base_url("output_style").'/'.$configseting['style_id'].'/effect.js"></script>';
	endif;
?>

<title>聚客_好评墙</title>
</head>

<body>
	
      <?php 
   //print_r($wallcode);
   function hidden_name($nick){
                $s1 = mb_substr($nick,0,1);
                $s2 = mb_substr($nick,-1,1);
                return $s1.'**'.$s2;
            }
   
  ?>

<div id="commentWall" class="commnetwall cw<?php echo $width;?>box">
        
		
<?php switch($configseting['style_id']) : case '1' : ?>
        
        <!-- start 第一个样式模板 ==================================================== -->
        <?php 
			if($width == 750) $sliceNum = 4; else if($width == 950)  $sliceNum = 5; else $sliceNum = 1;
			$stepLength = floor(count($commnetwall)/$sliceNum)*180;
		?>
		<script type="text/javascript">
			jQuery(function(){
					jQuery('#move').jRoll({
											innerElement : '#thisMove',
											sonElement:'.column',
											stepLength:<?php echo $stepLength; ?>,
											speed:<?php echo (int)$configseting['intervall']; ?>
										});
				});
		</script>
        <?php 
			$i = 0;
			$strArr = array('','','','','','','');
			foreach($commnetwall as $key=>$val) :
				$strArr[$i] .= '<li class="sbox">'.
								'<a href="http://item.taobao.com/item.htm?id='.$val['num_iid'].'" title="'.$val['item_title'].'" class="itempic" target="_blank">'.
								'<img src="'.$val['itempic_url'].'_160x160.jpg" />'.
								'</a>'.
								'<div class="say">'.
								'<dl>'.
								'<dt><img src="http://top-juke.b0.upaiyun.com/praise_icon/star1.png" /><br />￥'.$val['item_price'].'</dt>';
								foreach($val['praise'] as $k=>$v){
				$strArr[$i] .= 	'<dd><img src="http://top-juke.b0.upaiyun.com/praise_icon/good2.gif" />'.	
									'<strong>'.hidden_name($v['buy_nick'],$configseting['visual']).' 说:</strong>'.$v['content'].
									'</dd>';
								}
				$strArr[$i] .= '</dl></div>'.
								'</li>';
				$i ++;
				if($i >= $sliceNum) $i = 0;
			endforeach;
		?>
        <div id="hd"></div>
        <div id="move">
        	<div id="thisMove">
                <table>
                	<tr>
                    	<?php 
							$strArr = array_filter($strArr);
							foreach($strArr as $st){
								echo '<td align="center" class="column"><ul>'.$st.'</ul></td>';
							}
						?>
                    </tr>
                </table>
            </div>
        </div>
        
        <!-- //end 第一个样式模板 ==================================================== -->
         
<?php break; case '2' : ?>
       
        <!-- start 第二个样式模板 ==================================================== -->
        <?php 
			if($width == 750) $sliceNum = 4; else if($width == 950)  $sliceNum = 5; else $sliceNum = 1;
			$stepLength = floor(count($commnetwall)/$sliceNum)*180;
		?>
		<script type="text/javascript">
			jQuery(function(){
					jQuery('#move').jRoll({
											innerElement : '#thisMove',
											sonElement:'.column',
											stepLength:<?php echo $stepLength; ?>,
											speed:<?php echo (int)$configseting['intervall']; ?>
										});
				});
		</script>
        <?php 
			$i = 0;
			$strArr = array('','','','','','','');
			foreach($commnetwall as $key=>$val) :
				$strArr[$i] .= '<li class="sbox">'.
								'<a href="http://item.taobao.com/item.htm?id='.$val['num_iid'].'" title="'.$val['item_title'].'" class="itempic" target="_blank">'.
								'<img src="'.$val['itempic_url'].'_160x160.jpg" />'.
								'</a>'.
								'<div class="say">'.
								'<dl>'.
								'<dt><img src="http://top-juke.b0.upaiyun.com/praise_icon/love1.gif" /> ￥'.$val['item_price'].'</dt>';
								foreach($val['praise'] as $k=>$v){
				$strArr[$i] .= 	'<dd><img src="http://top-juke.b0.upaiyun.com/praise_icon/good2.gif" />'.	
									'<strong>'.hidden_name($v['buy_nick'],$configseting['visual']).' 说:</strong>'.$v['content'].
									'</dd>';
								}
				$strArr[$i] .= '</dl></div>'.
								'</li>';
				$i ++;
				if($i >= $sliceNum) $i = 0;
			endforeach;
		?>
        <div id="hd">买过的人为您推荐</div>
        <div id="move">
        	<div id="thisMove">
                <table>
                	<tr>
                    	<?php 
							$strArr = array_filter($strArr);
							foreach($strArr as $st){
								echo '<td align="center" class="column"><ul>'.$st.'</ul></td>';
							}
						?>
                    </tr>
                </table>
            </div>
        </div>
        <!-- //end 第二个样式模板 ==================================================== -->

<?php break; case '3' : ?>

            
        <!-- start 第三个样式模板 ==================================================== -->
        <?php 
			if($width == 750) $sliceNum = 4; else if($width == 950)  $sliceNum = 5; else $sliceNum = 1;
			$stepLength = floor(count($commnetwall)/$sliceNum)*180;
		?>
		<script type="text/javascript">
			jQuery(function(){
					jQuery('#move').jRoll({
											innerElement : '#thisMove',
											sonElement:'.column',
											stepLength:<?php echo $stepLength; ?>,
											speed:<?php echo (int)$configseting['intervall']; ?>
										});
				});
		</script>
        <?php 
			$i = 0;
			$strArr = array('','','','','','','');
			foreach($commnetwall as $key=>$val) :
				$strArr[$i] .= '<li class="sbox" style="background-image:url('.$val['itempic_url'].'_160x160.jpg);">'.
								'<a href="http://item.taobao.com/item.htm?id='.$val['num_iid'].'" title="'.$val['item_title'].'" class="itempic" target="_blank">'.
								//'<img src="'.$val['itempic_url'].'_160x160.jpg" />'.
								'</a>'.
								'<div class="say">'.
								'<dl>'.
								'<dt><img src="http://top-juke.b0.upaiyun.com/praise_icon/star2.png" />￥'.$val['item_price'].'</dt>';
								foreach($val['praise'] as $k=>$v){
				$strArr[$i] .= 	'<dd><img src="http://top-juke.b0.upaiyun.com/praise_icon/good2.gif" />'.	
									'<strong>'.hidden_name($v['buy_nick'],$configseting['visual']).' 说:</strong>'.$v['content'].
									'</dd>';
								}
				$strArr[$i] .= '</dl></div>'.
								'</li>';
				$i ++;
				if($i >= $sliceNum) $i = 0;
			endforeach;
		?>
        <div id="hd"></div>
        <div id="move">
        	<div id="thisMove">
                <table>
                	<tr>
                    	<?php 
							$strArr = array_filter($strArr);
							foreach($strArr as $st){
								echo '<td align="center" class="column"><ul>'.$st.'</ul></td>';
							}
						?>
                    </tr>
                </table>
            </div>
        </div>
        <!-- //end 第三个样式模板 ==================================================== -->


<?php break; case '4' : ?>
       
        <!-- start 第四个样式模板 ==================================================== -->
        <?php 
			if($width == 750) $sliceNum = 4; else if($width == 950)  $sliceNum = 5; else $sliceNum = 1;
			$stepLength = floor(count($commnetwall)/$sliceNum)*180;
		?>
		<script type="text/javascript">
			jQuery(function(){
					jQuery('#move').jRoll({
											innerElement : '#thisMove',
											sonElement:'.column',
											stepLength:<?php echo $stepLength; ?>,
											speed:<?php echo (int)$configseting['intervall']; ?>
										});
				});
		</script>
        <?php 
			$i = 0;
			$strArr = array('','','','','','','');
			foreach($commnetwall as $key=>$val) :
				$strArr[$i] .= '<li class="sbox">'.
								'<a href="http://item.taobao.com/item.htm?id='.$val['num_iid'].'" title="'.$val['item_title'].'" class="itempic" target="_blank">'.
								'<img src="'.$val['itempic_url'].'_160x160.jpg" />'.
								'</a>'.
								'<div class="say">'.
								'<dl>'.
								'<dt><img src="http://top-juke.b0.upaiyun.com/praise_icon/love16.gif" /> ￥'.$val['item_price'].'</dt>';
								foreach($val['praise'] as $k=>$v){
				$strArr[$i] .= 	'<dd><img src="http://top-juke.b0.upaiyun.com/praise_icon/good2.gif" />'.	
									'<strong>'.hidden_name($v['buy_nick'],$configseting['visual']).' 说:</strong>'.$v['content'].
									'</dd>';
								}
				$strArr[$i] .= '</dl></div>'.
								'</li>';
				$i ++;
				if($i >= $sliceNum) $i = 0;
			endforeach;
		?>
        <div id="hd"></div>
        <div id="move">
        	<div id="thisMove">
                <table>
                	<tr>
                    	<?php 
							$strArr = array_filter($strArr);
							foreach($strArr as $st){
								echo '<td align="center" class="column"><ul>'.$st.'</ul></td>';
							}
						?>
                    </tr>
                </table>
            </div>
        </div>
        <!-- //end 第四个样式模板 ==================================================== -->


<?php break; default : ?>
        
        <div class="commnetwall clearFix cw<?php echo $width;?>" id="commentWall">
            	<?php foreach($commnetwall as $key=>$val) : ?>
                <div class="sbox" style="background-image:url(<?php echo base_url("uploads/style1").'/face'.mt_rand(1,7).'.gif';?>);">
                	<div class="user">
                    	<div class="star"><img src="<?php echo base_url("uploads").'/'.'star1.png';?>" /></div>
                        <div class="say">
                        	<img src="<?php echo base_url("uploads/clogo").'/'.mt_rand(1,90).'.jpg';?>" alt="<?php echo $val['buy_nick'];?>" class="buy_avter" />
                            <?php echo $val['content'];?>
                        </div>
                        <div class="nick">
                        	<?php echo $val['buy_nick'].'<br />'.$val['created'];?>
                        </div>
                    </div>
                </div>
                <?php endforeach; ?>
        </div>

<?php break; endswitch; ?>
        
		
</div>


        

            
</body>
</html>